package com.common.help.test18;

public class Base {

	private final static int MAX_NUM = 1000;
	private int[] arr = new int[MAX_NUM];
	private int count;
	
	public void addAll(int[] arr){
		for(int a : arr){
			add(a);
		}
	}

	public void add(int a) {
		if(count<MAX_NUM){
			arr[count++] = a;
		}
	}
	
	public void clear(){
		for(int i=0; i<count; i++){
			arr[i] = 0;
		}
		count = 0;
	}
}
